﻿<include file="top" />
<neq name="Mo.Get.act" value="add">
	<div class="submenu"><a href="?m=MessagesMuti" class="current">[群发消息]</a>&nbsp; <a href="?m=MediaMuti&act=add" class="current">[添加群发素材]</a></div>
<table width="100%">
	<tr class="h"><td>ID</td><td>名称</td><td>媒体ID</td><td>媒体类型</td><td>创建时间</td><td>详情</td><td>操作</td></tr>
<loop name="MediaMuti">
	<tr class="l"><td>{$MediaMuti.Id}</td><td>{$MediaMuti.Name:F.encodeHTML}</td><td>{$MediaMuti.MediaId:left=15}...</td><td>{$MediaMuti.Type}</td><td>{$MediaMuti.CreatedAt:F.untimespan}</td>
	<td>{$MediaMuti.Details:ParseMessage}</td>
	<td><a href="?m=MediaMuti&a=Delete&Id={$MediaMuti.Id}" onclick="return window.confirm('确定要删除本记录吗？');">删除</a></td>
	</tr>
</loop>
	<tr class="l"><td colspan="7"><page for="MediaMuti" /></td></tr>
</table>
</else>
	<div class="submenu"><a href="?m=MediaMuti" class="current">[群发素材管理]</a>&nbsp; <a href="?m=MessagesMuti" class="current">[群发消息]</a></div>
<form action="?m=MediaMuti&a=save" method="post">
<b>类型：</b><select name="Type" onchange="if(this.value=='news'){document.getElementById('media_news').style.display='block';document.getElementById('media_video').style.display='none';}else{document.getElementById('media_news').style.display='none';document.getElementById('media_video').style.display='block';}">
<option value="news">图文消息</option>
<option value="video">视频</option>
</select> 
<div id="media_video" style="display:none;">
	<div><b>标题：</b><input name="Title" value="" type="text" /></div>
	<div><b>来源：</b>
	<select name="MediaId">
		<loop name="MediaVideo">
		<option value="{$MediaVideo.MediaId}">{$MediaVideo.Name}</option>
		</loop>
	</select></div>
	<div><b>描述：</b><textarea name="Description" cols="60" rows="4"></textarea></div>
</div>
<div id="media_news">
	<div><b>标题：</b><input name="News_Title" value="" type="text" /></div>
	<div><b>作者：</b><input name="News_Author" value="" type="text" /></div>
	<div><b>图片：</b>
	<select name="News_MediaId">
		<loop name="MediaThumb">
		<option value="{$MediaThumb.MediaId}">{$MediaThumb.Name}</option>
		</loop>
	</select></div>
	<div><b>摘要：</b><textarea name="News_Digest" cols="60" rows="2" class="width_400"></textarea></div>
	<div><b>内容：</b><textarea name="News_Content" cols="60" rows="4" class="width_400"></textarea></div>
	<div><b>URL：</b><input name="News_Content_Source_Url" value="" class="width_400" type="text" /></div>
</div>
<input type="submit" value="保存媒体" />
</form>
</neq>
<include file="foot" />